<template>
  <div>
    <p>{{sex}}</p>
    <button @click="rev">{{msg}}</button>
  </div>
</template>

<script>
export default {
  data () {
    return {
      sex:'女',
      msg:0
    }
  },

  created () {

  },

  methods: {
    rev(){
      if (this.msg===0) {
        this.sex='男'
        this.msg=1

      } else {
        this.sex='女'
        this.msg=0
      }
    }
  }
}
</script>

<style scoped lang='less'>

</style>
